{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import tensorflow as tf\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def normalize(X):\n",
    "    mean = np.mean(X, axis=0)\n",
    "    std = np.std(X, axis=0)\n",
    "    X = (X - mean) / std\n",
    "    return X\n",
    "\n",
    "def append_bias_reshape(features,labels):\n",
    "    m = features.shape[0]\n",
    "    n = features.shape[1]\n",
    "    x = np.reshape(np.c_[np.ones(m),features],[m,n + 1])\n",
    "    y = np.reshape(labels,[m,1])\n",
    "    return x, y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "boston = tf.contrib.learn.datasets.load_dataset('boston')\n",
    "X_train, Y_train = np.array(boston.data), np.array(boston.target)\n",
    "X_train = normalize(X_train)\n",
    "X_train, Y_train = append_bias_reshape(X_train, Y_train)\n",
    "#Y_train = normalize(Y_train)\n",
    "m = len(X_train)  #Number of training examples\n",
    "n = 14   # Number of features\n",
    "\n",
    "# Placeholder for the Training Data\n",
    "X = tf.placeholder(tf.float32, name='X', shape=[m,n])\n",
    "Y = tf.placeholder(tf.float32, name='Y')\n",
    "\n",
    "# Variables for coefficients\n",
    "#b = tf.Variable(0.0)\n",
    "w = tf.Variable(tf.random_normal([n,1]))\n",
    "\n",
    "\n",
    "# The Linear Regression Model\n",
    "Y_hat = tf.matmul(X, w) \n",
    "\n",
    "# Loss function\n",
    "loss = tf.reduce_mean(tf.square(Y - Y_hat, name='loss'))\n",
    "\n",
    "# Gradient Descent with learning rate of 0.05 to minimize loss\n",
    "optimizer = tf.train.GradientDescentOptimizer(learning_rate=0.01).minimize(loss)\n",
    "\n",
    "# Initializing Variables\n",
    "init_op = tf.global_variables_initializer()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 0: Loss 638.3056640625\n",
      "Epoch 100: Loss 33.49674987792969\n",
      "Epoch 200: Loss 23.471540451049805\n",
      "Epoch 300: Loss 22.737070083618164\n",
      "Epoch 400: Loss 22.42255401611328\n",
      "Epoch 500: Loss 22.243764877319336\n",
      "Epoch 600: Loss 22.13581085205078\n",
      "Epoch 700: Loss 22.067272186279297\n",
      "Epoch 800: Loss 22.02165985107422\n",
      "Epoch 900: Loss 21.990066528320312\n",
      "Epoch 1000: Loss 21.967451095581055\n",
      "Epoch 1100: Loss 21.950855255126953\n",
      "Epoch 1200: Loss 21.938457489013672\n",
      "Epoch 1300: Loss 21.92908477783203\n",
      "Epoch 1400: Loss 21.921932220458984\n",
      "Epoch 1500: Loss 21.916454315185547\n",
      "Epoch 1600: Loss 21.9122314453125\n",
      "Epoch 1700: Loss 21.908966064453125\n",
      "Epoch 1800: Loss 21.906448364257812\n",
      "Epoch 1900: Loss 21.904495239257812\n"
     ]
    }
   ],
   "source": [
    "total = []\n",
    "# Computation Graph\n",
    "with tf.Session() as sess:\n",
    "    # Initialize variables\n",
    "    sess.run(init_op)\n",
    "    writer = tf.summary.FileWriter('graphs', sess.graph)\n",
    "\n",
    "    # train the model for 100 epcohs\n",
    "    for i in range(2000):\n",
    "       _, l = sess.run([optimizer, loss], feed_dict={X: X_train, Y: Y_train})\n",
    "       total.append(l)\n",
    "       if i%100 == 0:\n",
    "        print('Epoch {0}: Loss {1}'.format(i, l))\n",
    "\n",
    "    writer.close()\n",
    "\n",
    "    Y_pred = sess.run(Y_hat,feed_dict = {X:X_train} )\n",
    "\n",
    "    w_value = sess.run(w)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Predicted value: $20539.45  Actual value: $16800.0 \n",
      "Done\n"
     ]
    },
    {
     "data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AF3s7kNtE5MsA7hSRafHq\nVnjJ6D4qIveJyD0i8m+9/vNF5KteIrK/8dMNEFIUTDpHxo0rAfy1qn5fRJZF5HwvqdmveZ9doKrH\nRWSDqj4uIu+GiWj1i4DYrvs9ABep6rMicimADwH4Vy4D8iJDLwTwRwBeBeCVAF7u3X868NXtAKYB\nnOfdZ4OXp+kTAK5U1SMi8q8B7ATwTvdHQkg8FARk3LgKwC7v/We94/0ALgVwi6oeB4AMIfpnANgr\nIufApAruOpxzkYh8Bya1xodV9X4ReRVM6umo+18K4JOq+qw/Ri8z6ctgMlECJjXFoxHnEpIZCgIy\nNojIBgAXA/gnXqreDgAVkX+f4jLPYlVl+pxA/x8BuEtVf9NbxX/F4VpfV9UrIvqfTjEeAXC/qr4m\nxTmEpII2AjJOvAXAraraV9VpVX0hgB8BuAjAHQC2icgU8AuhAQBPATg9cI0DAM733gdVP2cAeMR7\n/45SRm/G+G9EZE1gjA8B2CQir/H6uiLyj0u6P2kpFARknLgKq9kbfT4P4CpV/WuYdL5LXnWw93qf\n/xmAT/rGYgAfBLBLTOHwlcB1bgDwXzxVT1k76U8DOATgHhH5LoDfUtUTMALuI17f3QBeW9L9SUth\n9lFCCGk53BEQQkjLoSAghJCWQ0FACCEth4KAEEJaDgUBIYS0HAoCQghpORQEhBDScigICCGk5fx/\n/Piem28ASlUAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1f9be58c8d0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEKCAYAAAAIO8L1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG9RJREFUeJzt3XuQVOd95vHv090zw3AHMR4RQAbZ2BLajSR7VrE3juMY\nJ5Idr1Euq6CKd4mjKpVdWl8qu0mk9dZWNrVU2Umty6uslUS+yCSxQ/BFEXFVtMbYTnY3iqXRxbIQ\nwiCBL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",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1f9bf5a8e48>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "N= 500\n",
    "X_new = X_train\n",
    "#Y_pred =  np.matmul(X_new, w_value) # + b_value)\n",
    "print('Predicted value: ${0:.2f}  Actual value: ${1}'.format(Y_pred[N][0]*1000, Y_train[N][0]*1000) , '\\nDone')\n",
    "# Plot the result\n",
    "#print(Y_pred.shape, Y_train.shape)\n",
    "plt.plot(Y_train, Y_pred, 'bo')\n",
    "plt.xlabel(\"Actual Price\")\n",
    "plt.ylabel(\"Predicted Price\")\n",
    "plt.show()\n",
    "#\n",
    "plt.plot(total)\n",
    "plt.xlabel(\"Epochs\")\n",
    "plt.ylabel(\"Loss\")\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[  2.25327606e+01],\n",
       "       [ -9.06870961e-01],\n",
       "       [  1.05719388e+00],\n",
       "       [  7.08648488e-02],\n",
       "       [  6.92451715e-01],\n",
       "       [ -2.04395556e+00],\n",
       "       [  2.68448949e+00],\n",
       "       [  9.43273585e-03],\n",
       "       [ -3.10718179e+00],\n",
       "       [  2.47692680e+00],\n",
       "       [ -1.87059569e+00],\n",
       "       [ -2.05464840e+00],\n",
       "       [  8.55439901e-01],\n",
       "       [ -3.74148345e+00]], dtype=float32)"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# The coefficients\n",
    "w_value"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:tf-gpu-1p3]",
   "language": "python",
   "name": "conda-env-tf-gpu-1p3-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
